.site-header-logo {
  font-size: 22px;

  .mega-octicon {
    padding-right: 5px;
  }

  @media (min-width: 700px) {
    float: left;
  }

  .logo {
    width: auto;
    height: 18px;
    overflow: visible !important; // overrides for descender characters to not get cut off by SVG frame.

    @include breakpoint(sm) {
      height: 22px;
      opacity: 0.9;
    }

    &:hover {
      opacity: 1;
    }

    path,
    ellipse {
      fill: $gray-8;
    }
  }
}

.menu {
  margin-top: $spacer5;
  margin-bottom: 15px;
  list-style: none;
  background-color: $white !important;
  border: 1px solid $border-color !important;
  border-radius: $border-radius;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.menu-item {
  position: relative;
  display: block;
  padding: 12px 15px;
  border-bottom: 1px solid $border-color !important;

  &:first-child {
    border-top: 0;
    border-top-right-radius: $border-radius;
    border-top-left-radius: $border-radius;
  }

  &:last-child {
    border-bottom: 0;
    border-bottom-right-radius:  $border-radius;
    border-bottom-left-radius:  $border-radius;
  }

  &:hover {
    text-decoration: none;
    background-color: $gray-0 !important;
  }

  &.selected {
    font-weight: bold;
    color: $gray-7 !important;
    cursor: default;
    background-color: $white !important;
  }
}

// Site Header

.site-header {
  color: $jumbo-color !important;
  background-color: lighten($jumbo-bg-color, 2%) !important;
  border-bottom: 1px solid $gray-1;
  border-bottom-color: darken($jumbo-bg-color, 8%) !important;
  -webkit-font-smoothing: antialiased;
  padding-top: 25px;
  padding-bottom: 25px;
  padding-left: $spacer3;
  padding-right: $spacer3;
  text-align: center;

  @media (min-width: 700px) {
    text-align: left;
  }

  @include breakpoint(lg) {
    padding-left: 0;
    padding-right: 0;
  }
}

.site-header a {
  color: inherit !important;
  transition: all 0.3s;

  &.active,
  &:hover {
    color: $jumbo-color-strong !important;
  }
  &:active {
    color: $jumbo-color-subtle !important;
  }
}

.site-header-nav {
  margin-top: 0;
  margin-top: 20px;
  min-height: 30px;
  line-height: 30px;

  @media (min-width: 700px) {
    float: right;
    margin-top: 7px;
  }

  @media (max-width: 699px) {
    line-height: 2.3;
  }

  .mega-octicon {
    min-width: 32px; // stops jumping of the nav when loading the page
  }
}

.site-header-nav-item {
  font-size: 15px;
  border-bottom: 2px solid transparent;
  display: inline-block;

  + .site-header-nav-item {
    margin-left: 20px;
  }

  &.active, &:active, &:hover {
    border-bottom-color: $jumbo-color-strong !important;
    text-decoration: none;
  }

  &.bordered {
    border: 1px solid $jumbo-color-strong !important;
    border-radius: 3px;
    padding: 0 7px;
    opacity: 0.7;
    font-size: 12px;
    line-height: 2;
  }

  &.octicon {
    border: none !important;
  }
}

// Electron icon
.site-header-icon {
  width: 38px;
  height: 38px;
  vertical-align: middle;
  margin-top: -4px; // visually align
  margin-right: 0.4em;

  .svg-fill {
    fill: currentColor !important;
  }
  .svg-stroke {
    stroke: currentColor !important;
    stroke-width: 1.2;
    stroke-linecap: round;
  }
}

// keep it centered a bit longer
@media (min-width: 700px) {
  .site-header { text-align: center; }
  .site-header-logo,
  .site-header-nav {
    float: none;
  }
}
.site-header-logo { @include breakpoint(lg) { float: left; } }
.site-header-nav  { @include breakpoint(lg) { float: right; } }

// swap logo and nav for right-to-left languages
html[dir="rtl"] {
  .site-header-logo { @include breakpoint(lg) { float: right; } }
  .site-header-nav  { @include breakpoint(lg) { float: left; } }
}

// RTL Code
html[dir="rtl"] .site-header-nav-item {
  + .site-header-nav-item {
    margin-left: 0;
    margin-right: 20px;
  }
}
